<template>
	<view class="page tn-safe-area-inset-bottom" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
		<view class="top-bg"></view>
		<dawnBar title="报告查询"></dawnBar>
		<view class="page-container">
			<view class="tn-bg-white dawn-radius dawn-shadow tn-padding-sm">
				<view class="list-text" @click="nav('/hosp/report/list?reportType=test')">
					<view class="list__left">
						<image class="list__left__image" src="../../static/images/icon_jybg.png" mode="aspectFit">
						</image>
						<view class="list__left__text" style="color: black;">检验报告</view>
					</view>
					<view class="list__right">
						<text class="tn-icon-right dawn-color-grey"></text>
					</view>
				</view>
				<view class="list-text" @click="nav('/hosp/report/list?reportType=check')">
					<view class="list__left">
						<image class="list__left__image" src="../../static/images/icon_jcbg.png" mode="aspectFit">
						</image>
						<view class="list__left__text" style="color: black;">检查报告</view>
					</view>
					<view class="list__right">
						<text class="tn-icon-right dawn-color-grey"></text>
					</view>
				</view>

			</view>

		</view>
	</view>
</template>

<script>
	import page_mixin from '@/mixins/page_mixin.js'
	import dayjs from '@/plugin/dayjs/dayjs.min.js';
	import * as Util from '@/utils/util.js';
	import * as api from '@/api/api.js';
	import * as config from "@/api/config.js";

	import chs from "@/libs/chs.js";
	import {
		toLogin
	} from '@/libs/login.js';
	import {
		mapGetters
	} from "vuex";
	const app = getApp();

	export default {
		name: 'order',
		mixins: [page_mixin],
		computed: mapGetters(['appConfig', 'uid', 'isLogin', 'userInfo', 'patientInfo']),
		data() {
			return {
				iconSize: 38,
				size: 40,
				loading: false,
				show: false,
				msg: '',
				dawnMsgBox: '',
				success: 0,
				successTitle: '正在处理中，请稍候...',
			}
		},
		async onLoad(options) {
			await this.$onLaunched;
			console.info("order return options");
			console.table(options);
			if (!this.isLogin) {
				toLogin();
				return;
			}
		},
		methods: {
			formatDate: function(date) {
				return dayjs(date).format("YYYY-MM-DD");
			},
			fen2yuan(price) {
				return Util.fen2yuan(price)
			},
			formatDateTime: function(date) {
				return dayjs(date).format("YYYY-MM-DD HH:mm:ss");
			}
		}
	}
</script>

<style lang="scss" scoped>
	.dawn-success {
		height: auto;
		z-index: 100;
		padding: 30rpx 0rpx 60rpx 0rpx;
	}

	.list-text {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10rpx 0rpx !important;
		border-bottom: 1px solid $dawn-line-color;

		&__right {
			font-size: $dawn-font-size-md;
		}
	}

	.list-icon-text,
	.list-image-text {
		padding: 15rpx 20rpx;
		border-bottom: 1px solid $dawn-theme-color-light;
	}

	.list {
		font-size: 14px;

		&__left {
			display: flex;
			align-items: center;
			justify-content: flex-start;

			&__icon,
			&__image {
				margin-right: 18rpx;
			}

			&__image {
				margin-right: 18rpx;
				width: 60rpx;
				height: 60rpx;
			}
		}

		&__right {
			display: flex;
			align-items: center;
			justify-content: flex-end;
		}
	}

	/* 卡 */
	.button-vip {
		width: 100%;
		height: 240rpx;
		border-radius: $dawn-border-radius;
		position: relative;
		z-index: 1;

		&::after {
			content: " ";
			position: absolute;
			z-index: -1;
			width: 100%;
			height: 100%;
			left: 0;
			bottom: 0;
			border-radius: inherit;
			opacity: 1;
			transform: scale(1, 1);
			background-size: 100% 100%;
		}
	}
</style>